<?php
$driver=null;
$options=null;
$url=($_REQUEST["s_url"]==null)?"https://www.douyin.com/video/7363475813951425826":$_REQUEST["s_url"];
$url="https://news.ifeng.com/c/8ZKnhbe8uvj";
include("d:/collect_new/collect/myzhuaqu.php");
include("d:/collect_new/collect/selenium_header.php");
use Facebook\WebDriver\WebDriverBy;
use Facebook\WebDriver\WebDriverExpectedCondition;
use Facebook\WebDriver\WebDriverWait;

$capabilities = DesiredCapabilities::chrome();
$capabilities->setCapability(ChromeOptions::CAPABILITY, $options);
$driver = RemoteWebDriver::create('http://localhost:9515', $capabilities);
$driver->get($url);
$cookiestr=getCookieByHost(host($url));
$wait = new WebDriverWait($driver, 5);
$element = $wait->until(
    WebDriverExpectedCondition::visibilityOfElementLocated(
        WebDriverBy::tagName('video')
    )
);
//$srcValue=$element->findElement((WebDriverBy::tagName('source')))->getAttribute("src");
echo $driver->getPageSource();
$driver->quit();



